Skip to content

Conversation

@hoangSTS
Copy link
Contributor

@hoangSTS hoangSTS commented Oct 2, 2025

  • Retry API calls with the refreshed access token once the refresh completes.
  • Clear tokens once the refreshed failed.

@coderabbitai
Copy link

coderabbitai bot commented Oct 2, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/update_axios_configuration

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

instance.interceptors.response.eject(interceptor)
if (isTokenExpired && !originalConfig._retry) {
// Mark this request as retried to prevent infinite loops
originalConfig._retry = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to set it back to false?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we do need to reset _retry back to false

instance.interceptors.response.use(
(response: AxiosResponse) => {
// Add response logging for debugging
if (configs.DEBUG_ENABLED) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't need these logging as we can see the requests from network tab

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, let me remove them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants